package flex.cc.uac.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import flex.cc.uac.entity.UacActionEntity;
import flex.cc.uac.entity.UacMenuEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 权限表
 * 
 * @author zhangzk
 * @email zhangzhikai@sinosoft.com.cn
 * @date 2020-06-21 22:53:59
 */
@Mapper
public interface UacActionDao extends BaseMapper<UacActionEntity> {

    List<UacActionEntity> getOwnUacActionListByUserId(Long userId);

    /**
     * 根据角色ID查询权限列表
     */
    List<UacActionEntity> listActionListByRoleId(@Param("roleId") Long roleId);

    List<UacActionEntity> listActionList(@Param("menuList") List<UacMenuEntity> menuList);

    List<Long> getCheckedActionList(Long roleId);
}
